







{extend name="main/index" /}
{block name="main"}
<!-- Start right content -->
<div class="content-page">
    <!-- ============================================================== -->
    <!-- Start Content here -->
    <!-- ============================================================== -->
    <div class="content">


    <!-- Start row here -->
    <!-- ============================================================== -->
        <div class="row">
            <div class="col-sm-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>Form Layout</h2>
                    </div>
                    <div class="panel-body">
                        <h3 class="mt0">Input Addons and Icons</h3>
                        <p class="mb20">Input addons with icons and validation states</p>
                        <form role="form" class="form-horizontal">
                            <div class="form-group">
                                <label class="col-md-2 control-label">Email Address</label>
                                <div class="col-md-8">
                                    <div class="input-group">                           
                                        <span class="input-group-addon">
                                            <i class="fa fa-envelope-o"></i>
                                        </span>
                                        <input type="text" class="form-control" placeholder="Email Address">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Password</label>
                                <div class="col-md-8">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-key"></i>
                                        </span>
                                        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Email Address</label>
                                <div class="col-md-8">
                                    <div class="input-group input-icon right">
                                        <span class="input-group-addon">
                                            <i class="fa fa-envelope-o"></i>
                                        </span>
                                        <i class="fa fa-exclamation-circle tooltips" data-original-title="Invalid email!" data-container="body"></i>
                                        <input id="email" class="input-error form-control" type="text" placeholder="Email Address">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <p class="help-block">With tooltip</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Password</label>
                                <div class="col-md-8">
                                    <div class="input-group input-icon right">
                                        <span class="input-group-addon">
                                            <i class="fa fa-key"></i>
                                        </span>
                                        <i class="fa fa-exclamation-circle tooltips" data-original-title="Password too long!" data-container="body"></i>
                                        <input type="password" class="input-error form-control" placeholder="Password">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <p class="help-block">With tooltip</p>
                                </div>
                            </div>
                            <div class="form-group has-success">
                                <label class="col-md-2 control-label">Input Addon Success</label>
                                <div class="col-md-8">
                                    <div class="input-group input-icon right">
                                        <span class="input-group-addon">
                                            <i class="fa fa-envelope-o"></i>
                                        </span>
                                        <i class="fa fa-check-circle tooltips" data-original-title="Email is valid!" data-container="body"></i>
                                        <input id="email" class="input-error form-control" type="text" placeholder="Email Address">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <p class="help-block">Email is valid!</p>
                                </div>
                            </div>
                            <div class="form-group has-error">
                                <label class="col-md-2 control-label">Input Addon Error</label>
                                <div class="col-md-8">
                                    <div class="input-group input-icon right">
                                        <span class="input-group-addon">
                                            <i class="fa fa-key"></i>
                                        </span>
                                        <i class="fa fa-exclamation-circle tooltips" data-original-title="Password too long!" data-container="body"></i>
                                        <input type="password" class="input-error form-control" placeholder="Password">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <p class="help-block">Error!</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Left Icon</label>
                                <div class="col-md-8">
                                    <div class="input-icon">
                                        <i class="fa fa-fw fa-bell-o"></i>
                                        <input type="text" class="form-control" placeholder="Left icon">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Right Icon</label>
                                <div class="col-md-8">
                                    <div class="input-icon right">
                                        <i class="fa fa-fw fa-bell-o"></i>
                                        <input type="text" class="form-control" placeholder="Right icon">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <p class="help-block">Icon on right</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Checkbox Addon</label>
                                <div class="col-md-8">
                                    <div class="input-group">
                                        <div class="input-group-addon"><input type="checkbox"></div>
                                        <input type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Checkbox Addon</label>
                                <div class="col-md-8">
                                    <div class="input-group">
                                        <input type="text" class="form-control">
                                        <div class="input-group-addon"><input type="checkbox"></div>
                                        
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <p class="help-block">Checkbox on right</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Radio Addon</label>
                                <div class="col-md-8">
                                    <div class="input-group">
                                        <div class="input-group-addon"><input type="radio"></div>
                                        <input type="text" class="form-control">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Radio Addon</label>
                                <div class="col-md-8">
                                    <div class="input-group">
                                        <input type="text" class="form-control">
                                        <div class="input-group-addon"><input type="radio"></div>
                                        
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <p class="help-block">Radio on right</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Input Processing</label>
                                <div class="col-md-8">
                                    <div class="input-icon left spinner">
                                        <i class="fa fa-fw fa-spin fa-spinner"></i>
                                        <input id="email" class="input-error form-control" type="text" placeholder="Processing...">
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Input Processing</label>
                                <div class="col-md-8">
                                    <div class="input-icon right spinner">
                                        <i class="fa fa-fw fa-spin fa-spinner"></i>
                                        <input id="email" class="input-error form-control" type="text" placeholder="Processing...">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <p class="help-block">Processing right</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Static Paragraph</label>
                                <div class="col-md-8">
                                    <p class="form-control">email@example.com</p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-2 control-label">Readonly</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" placeholder="Readonly" readonly="">
                                </div>
                            </div>
                        </form>
                        <div class="panel-footer">
                            <div class="row">
                                <div class="col-sm-8 col-sm-offset-2">
                                    <button class="btn-success btn">Submit</button>
                                    <button class="btn-default btn">Cancel</button>
                                    <button class="btn-inverse btn">Reset</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <!-- End row here -->
    <!-- ============================================================== -->

       
    </div>
    <!-- ============================================================== -->
    <!-- End content here -->
    <!-- ============================================================== -->

</div>
<!-- End right content -->




<!-- 模态框 - 删除 -->
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">删除用户</h4>
      </div>
      <div class="modal-body">
        <h2>您确定要删除吗?</h2>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="dodel">确定</button>
      </div>
    </div>
  </div>
</div>





{/block}


{block name='myjs'}
    <script>
        // 设置弹框参数
        toastr.options = {
            closeButton: true,//是否显示关闭按钮
            progressBar: true,//实现显示计时条
            timeOut: "3000",//自动关闭时间
            positionClass: "toast-bottom-left"//提示位置
            // toast-top-full-width 顶端，宽度铺满整个屏幕
            // toast-top-right  顶端右边
        };


            $('#dodel').click(function(){
                var id = $('#del').attr('data-id');
                // console.log(id);
                $.ajax({
                    url: '/admin/User/delete',
                    type: 'POST',
                    data: 'id='+id,
                    success: function (data) {
                        console.log(data);
                        if (data.status) {
                            // toastr.success('恭喜!删除记录成功!');
                            alert('删除成功！');
                            window.location.reload();//刷新当前页面.
                            return false;
                        }
                        else{
                            alert('删除失败！');
                            return false;
                        }
                    },
                    error:function(){
                        alert('ajax失败');
                    }
                });
                // 这句是为了让模态框点击关闭
                $('#dodel').attr('data-dismiss','modal');
            })
    </script>

{/block}



